gtk4.git
8 years agoGDK W32: More flexible modal operation mode
Руслан Ижбулатов [Fri, 11 Aug 2017 07:00:41 +0000 (07:00 +0000)]
GDK W32: More flexible modal operation mode

Instead of using a boolean to indicate a modal operation being in progress,
use a set of flags, and allow these to be set and unset independently.

Specifically, this allows WM_CAPTURECHANGED handler to only act when a drag-move or
drag-resize modal operation is in progress, and ignore DND (which can also cause
WM_CAPTURECHANGED to be posted). This avoids a crash due to assertion failure when
OLE2 DND code tries to end a modal operation that was already ended by the WM_CAPTURECHANGED
handler.

(This commit is cherry-picked from the gtk-3-22 branch)

https://bugzilla.gnome.org/show_bug.cgi?id=786121

8 years agoGDK W32: fix monitor pruning code
Руслан Ижбулатов [Thu, 23 Nov 2017 07:15:28 +0000 (07:15 +0000)]
GDK W32: fix monitor pruning code

Decrement the counter for each removed element, otherwise we skip
one element every time we remove one. Also, no need for continue here.

8 years agoGDK W32: Correctly report window position in HiDPI mode
Руслан Ижбулатов [Fri, 29 Sep 2017 12:50:03 +0000 (12:50 +0000)]
GDK W32: Correctly report window position in HiDPI mode

Window position returned by get_frame_extents() should be scaled.

Also take this opportunity to apply the same rounding that X11 backend
applies.

https://bugzilla.gnome.org/show_bug.cgi?id=788053

8 years agoGDK-Win32: Fix AeroSnap on HiDPI
Chun-wei Fan [Tue, 8 Aug 2017 14:19:45 +0000 (22:19 +0800)]
GDK-Win32: Fix AeroSnap on HiDPI

Commit 1d0fad3 revealed that there were some assumptions made that were
actually to compensate for the bug fixed by that commit, so we need to
remove those assumptions as they would result in AerSnap to not work
properly on HiDPI screens.

Also re-do how we set the x and y positions of our GdkWindow, so that we
are more consistent across the board when we go between a GDK window
coordinate and a Windows API window cooredinate.

This would also simplify the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=785999

8 years agoGDK W32: Handle drivers that do not send WT_CSRCHANGE after WT_PROXIMITY
Руслан Ижбулатов [Fri, 10 Feb 2017 10:49:00 +0000 (10:49 +0000)]
GDK W32: Handle drivers that do not send WT_CSRCHANGE after WT_PROXIMITY

Some drivers don't do that (not sure whether that is the correct behaviour
or not). Remember each WT_PROXIMITY with LOWORD(lParam) != 0 that we get,
then look for a WT_CSRCHANGE. If WT_CSRCHANGE doesn't come, but a WT_PACKET
does, assume that this device is the one that sent WT_PROXIMITY.

Also include fallback code to ensure that WT_PACKETs for an enabled device
disable the system pointer, because WT_PROXIMITY handler might have
enabled it by mistake, since it's not possible to know which device left
the proximity (it might have been a disabled device).

https://bugzilla.gnome.org/show_bug.cgi?id=778328

8 years agoGDK W32: Apply HiDPI scale properly to monitors
Руслан Ижбулатов [Fri, 17 Feb 2017 15:59:32 +0000 (15:59 +0000)]
GDK W32: Apply HiDPI scale properly to monitors

Previously HiDPI scale was retrieved and applied too late in the initialization
process to affect monitor size and monitor workarea size, but the code that
initializes these sizes *did* try to use the scale, even though it was always
getting scale=1.

To fix this, move the too-late code into monitor enumeration routine.
This also fixes a probable semantic bug where width and height were divided
by scale, again.

Now monitor and workarea should be in application pixels (i.e. divided by scale),
as intended.

https://bugzilla.gnome.org/show_bug.cgi?id=778835

8 years agoGDK W32: Different maximized window position for non-CSD windows
Руслан Ижбулатов [Thu, 26 Jan 2017 17:44:01 +0000 (17:44 +0000)]
GDK W32: Different maximized window position for non-CSD windows

It seems that WM interprets the same MINMAXINFO contents differently
depending on which styles the window has. Play along.

https://bugzilla.gnome.org/show_bug.cgi?id=765161

8 years agoGDK W32: Ensure that we use made-up monitors when there are none
Руслан Ижбулатов [Fri, 20 Jan 2017 10:23:00 +0000 (10:23 +0000)]
GDK W32: Ensure that we use made-up monitors when there are none

Previously GDK only made up monitors when it initially found none. Now it
also makes up monitors when it initially finds some, but later fails to get
their informatin in a normal way and finally prunes them out, being left with
zero monitors.

Having zero-length monitor array is unexpected and causes a number
of critical warnings and some critical functionality (such as displaying
drop-down menus) fails in such cases.

Ideally, there might be such a way to interrogate W32 API that produces the
information about non-real (but active) monitors out of it so that it isn't
necessary for us to make stuff up. However, this code is already complicated,
and i am not prepared to dig W32 API to find a way to do this.

This fixes the issues people had when they accessed a Windows desktop via RDP.

https://bugzilla.gnome.org/show_bug.cgi?id=777527

8 years agoGDK W32: Fix idiotic gdk_win32_display_get_monitor() implementation
Руслан Ижбулатов [Fri, 20 Jan 2017 09:08:41 +0000 (09:08 +0000)]
GDK W32: Fix idiotic gdk_win32_display_get_monitor() implementation

Replace the code borrowed from the X11 backend with the code borrowed from Wayland backend. Now GTK doesn't crash when the number of monitors is zero.

8 years agoGDK W32: Use keyboard hook to detect AeroSnap combinations better
Руслан Ижбулатов [Sat, 24 Dec 2016 21:01:23 +0000 (21:01 +0000)]
GDK W32: Use keyboard hook to detect AeroSnap combinations better

Windows WM handles AeroSnap for normal windows on keydown. We did this
on keyup only because we do not get a keydown message, even if Windows WM
does nothing with a combination. However, in some specific cases it DOES
do something - and we have no way to detect that. Specifically, winkey+downarrow
causes maximized window to be restored by WM, and GDK fails to detect that. Then
GDK gets a keyup message, figures that winkey+downarrow was pressed and released,
and handles the combination - by minimizing the window.

To overcome this, install a low-level keyboard hook (high-level ones have
the same problem as normal message loop - they don't get messages when
Windows WM handles combinations) and use it to detect interesting key combinations
before Windows WM has a chance to block them from being processed.

Once an interesting combination is detected, post a message to the window, which
will be handled in due order.

It should be noted that this code handles key repetitions in a very crude manner.

The downside is that AeroSnap will not work if hook installation function call fails.
Also, this is a global hook, and if the hook procedure does something wrong, bad things
can happen.

https://bugzilla.gnome.org/show_bug.cgi?id=776031

8 years agoGDK W32: Handle CapsLock as part of the key shift level
Руслан Ижбулатов [Wed, 4 Jan 2017 04:31:53 +0000 (04:31 +0000)]
GDK W32: Handle CapsLock as part of the key shift level

Instead of using some kind of flawed logic about modifying a keypress result
when CapsLock is toggled, just add a CapsLock shift level (and all derived
shift levels, i.e. Shift+CapsLock and CapsLock+AltGr and Shift+CapsLock+AltGr)
and query Windows keyboard layout API about the result of keypresses involving
CapsLock.

Keysym table is going to be (roughly) twice as large now, but CapsLock'ed
keypresses will give correct results for some keyboard layouts (such as
Czech keyboard layout, which without this change produces lowercase letters
for CapsLock->[0,2,3,4...] instead of uppercase ones).

Keymap update time also increases accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=165385

8 years agoGDK W32: Special handling for VK_PAUSE
Руслан Ижбулатов [Wed, 27 Jul 2016 18:05:10 +0000 (18:05 +0000)]
GDK W32: Special handling for VK_PAUSE

Similar to VK_DIVIDE, this key can't be mapped to a scancode by
MapVirtualKeyEx(). Googling suggests that this is a known bug.

https://bugzilla.gnome.org/show_bug.cgi?id=769214

8 years agoGDK W32: Change WM_SYSMENU style switch logic
Руслан Ижбулатов [Sun, 25 Dec 2016 17:48:20 +0000 (17:48 +0000)]
GDK W32: Change WM_SYSMENU style switch logic

Instead of checking for window state and giving it extra styles that
fit, just give it all styles that it is missing. It turned out that
otherwise it is impossible to, for example, restore a maximized window
via sysmenu. Also, be more flexible towards GDK/WM window state mismatches
and consider the window minimized/maximized if *either* GDK or WM thinks so.

https://bugzilla.gnome.org/show_bug.cgi?id=776485

8 years agoGDK W32: Remove unneeded assertion
Руслан Ижбулатов [Mon, 9 Jan 2017 09:53:46 +0000 (09:53 +0000)]
GDK W32: Remove unneeded assertion

Just set check_for_dpi_awareness = TRUE and eventually it will be handled
correctly, even if setDpiAwareFunc() returns E_ACCESSDENIED or shcore functions
are NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=777031

8 years agoGDK W32: Handle maximizing correctly for small primary monitors
Руслан Ижбулатов [Sun, 11 Dec 2016 16:26:34 +0000 (16:26 +0000)]
GDK W32: Handle maximizing correctly for small primary monitors

When primary monitor is smaller than the actual monitor on which the
window is being maximized, the WM will do widnow size adjustments
that will completely screw the window size if we try to make it
smaller than 100% fullscreen (to account for taskbar size, for example).

Fix this by overriding maximized window size during WM_WINDOWPOSCHANGING.

https://bugzilla.gnome.org/show_bug.cgi?id=775808

8 years agoGDK: Make sure W32 backend compiles without GdkDeviceManager
Руслан Ижбулатов [Thu, 30 Nov 2017 05:38:20 +0000 (05:38 +0000)]
GDK: Make sure W32 backend compiles without GdkDeviceManager

https://bugzilla.gnome.org/show_bug.cgi?id=773299

8 years agogtkeventcontrollerscroll: Add some docs
Carlos Garnacho [Fri, 1 Dec 2017 23:18:07 +0000 (00:18 +0100)]
gtkeventcontrollerscroll: Add some docs

8 years agoAdd GtkEventControllerScroll to the docs
Matthias Clasen [Fri, 1 Dec 2017 22:17:04 +0000 (14:17 -0800)]
Add GtkEventControllerScroll to the docs

It is not actually documented yet, unfortunately.

8 years agodocs: Some revision to the migration docs
Matthias Clasen [Fri, 1 Dec 2017 15:29:14 +0000 (10:29 -0500)]
docs: Some revision to the migration docs

Cover more of the recent changes, and revise some of the wording.

8 years agoFinish conversion of pixbuf cell renderer icon size
Matthias Clasen [Fri, 1 Dec 2017 15:26:51 +0000 (10:26 -0500)]
Finish conversion of pixbuf cell renderer icon size

Change the name of the property from stock-size to icon-size,
and make it an enum property instead of uint. This makes it
impossible to specify invalid numeric values in ui files, and
at the same time makes it possible to refer to the existing
values by their nick.

Fix up the callers.

8 years agoplacesview: Drop the word stock from the docs
Matthias Clasen [Fri, 1 Dec 2017 15:26:21 +0000 (10:26 -0500)]
placesview: Drop the word stock from the docs

It does not really add anything here, and makes it harder
to grep for occurrences of stock ids.

8 years agorecent chooser: Stop specifying stock-size
Matthias Clasen [Fri, 1 Dec 2017 15:25:17 +0000 (10:25 -0500)]
recent chooser: Stop specifying stock-size

We were using a no-longer-existing numeric value here,
and we can just rely on the theme to set this now.

8 years agotoolbutton: Remove the word stock from internal docs
Matthias Clasen [Fri, 1 Dec 2017 15:21:59 +0000 (10:21 -0500)]
toolbutton: Remove the word stock from internal docs

We no longer support stock items.

8 years agorecent chooser: Remove the word stock from the docs
Matthias Clasen [Fri, 1 Dec 2017 15:19:32 +0000 (10:19 -0500)]
recent chooser: Remove the word stock from the docs

We don't support stock items anymore.

8 years agofilechooser: Remove the word stock from the docs
Matthias Clasen [Fri, 1 Dec 2017 15:16:20 +0000 (10:16 -0500)]
filechooser: Remove the word stock from the docs

It does not really add anything here, and makes it harder
to grep for occurrences of stock ids.

8 years agoentry: Remove references to stock ids from the docs
Matthias Clasen [Fri, 1 Dec 2017 15:14:10 +0000 (10:14 -0500)]
entry: Remove references to stock ids from the docs

We no longer support stock images.

8 years agoimage definition: Drop unused struct
Matthias Clasen [Fri, 1 Dec 2017 15:12:17 +0000 (10:12 -0500)]
image definition: Drop unused struct

We no longer support stock images.

8 years agoFix the doc tools build
Matthias Clasen [Fri, 1 Dec 2017 14:43:52 +0000 (09:43 -0500)]
Fix the doc tools build

8 years agowidget-factory: Fix up icon size handling
Matthias Clasen [Fri, 1 Dec 2017 14:25:13 +0000 (09:25 -0500)]
widget-factory: Fix up icon size handling

Make the icon grid on page 2 work with our new
approach to icon sizes.

8 years agoRevert "gtksnapshot: Merge trivial clip duplicates"
Alexander Larsson [Fri, 1 Dec 2017 08:08:57 +0000 (09:08 +0100)]
Revert "gtksnapshot: Merge trivial clip duplicates"

This reverts commit d95cbb275729370a2dd67e24570ac1c68b62b697.

This is better solved by commit 94184eda4214b3162eead554212443b3a0f50481

8 years agosnapashot: Optimize rounded clip nodes
Timm Bäder [Fri, 1 Dec 2017 07:04:31 +0000 (08:04 +0100)]
snapashot: Optimize rounded clip nodes

If the rounded clip node is rectilinear, we can simplify it to a normal
clip node. If not, we really need to use a rounded clip node. In both
cases, we can do the same check we do when collecting normal clips and
avoid the clip node altogether if the child node does not get clipped
anyway.

This saves between 3 and 10 nodes in the widget factory, depending on
what page gets rendered.

8 years agosnapshot: Only create clip nodes if we need to
Timm Bäder [Fri, 1 Dec 2017 06:38:43 +0000 (07:38 +0100)]
snapshot: Only create clip nodes if we need to

Clip nodes have a clip rect and we only need to actually create a clip
node if any child node gets clipped at all. If the clip rect conains the
child node bounds entirely, we don't need a clip node.

8 years agowidgetbowl: Only use one widget type
Timm Bäder [Fri, 24 Nov 2017 11:50:47 +0000 (12:50 +0100)]
widgetbowl: Only use one widget type

Every added widget having a separate random widget type makes it useless
to use the widgetbowl demo for any sort of performance comparison.
Instead. use only one widget type for all the moving children but make
that changable.

8 years agowayland: Never send NULL app id
Timm Bäder [Fri, 17 Nov 2017 19:07:18 +0000 (20:07 +0100)]
wayland: Never send NULL app id

The old gdk_get_program_class was never returning NULL, but
g_get_prgname might. So use the same fallback app id name we were using
before.

8 years agoGskVulkanGlyphCache: Remove unused struct member
Timm Bäder [Fri, 17 Nov 2017 19:32:11 +0000 (20:32 +0100)]
GskVulkanGlyphCache: Remove unused struct member

8 years agowindow: Plug a memory leak
Timm Bäder [Sun, 19 Nov 2017 17:55:32 +0000 (18:55 +0100)]
window: Plug a memory leak

8 years agoDrop unused gtkcssstylefuncs.c
Matthias Clasen [Thu, 30 Nov 2017 23:46:54 +0000 (18:46 -0500)]
Drop unused gtkcssstylefuncs.c

Clean up all the places where the header was still
included needlessly.

8 years agocss style funcs: Avoid pixbufs
Matthias Clasen [Thu, 30 Nov 2017 22:40:41 +0000 (17:40 -0500)]
css style funcs: Avoid pixbufs

We can get what we need with GdkTexture.

8 years agoAvoid GdkPixbuf in docs
Matthias Clasen [Thu, 30 Nov 2017 22:32:05 +0000 (17:32 -0500)]
Avoid GdkPixbuf in docs

GdkTexture is preferred now.

8 years agoicon helper: Avoid gratitious pixbuf use
Matthias Clasen [Thu, 30 Nov 2017 22:31:17 +0000 (17:31 -0500)]
icon helper: Avoid gratitious pixbuf use

We can just get the texture directly from the icontheme.

8 years agomountoperation: Store icons as textures
Matthias Clasen [Thu, 30 Nov 2017 21:39:14 +0000 (16:39 -0500)]
mountoperation: Store icons as textures

This reduces the amount of pixbufs in this code.

8 years agobroadway: Add some (disabled) debugging tools
Alexander Larsson [Thu, 30 Nov 2017 16:50:46 +0000 (17:50 +0100)]
broadway: Add some (disabled) debugging tools

8 years agobroadway: Don't send node updates to browser if nothing changed
Alexander Larsson [Thu, 30 Nov 2017 16:32:01 +0000 (17:32 +0100)]
broadway: Don't send node updates to browser if nothing changed

8 years agobroadway: Fix texture hash function
Alexander Larsson [Thu, 30 Nov 2017 16:30:27 +0000 (17:30 +0100)]
broadway: Fix texture hash function

8 years agogtksnapshot: Merge trivial clip duplicates
Alexander Larsson [Thu, 30 Nov 2017 14:31:46 +0000 (15:31 +0100)]
gtksnapshot: Merge trivial clip duplicates

I got a lot of "clip in clip" cases, for example a CellClip with a
CellTextClip inside. It is really trivial to merge these when we
pop and makes it easier for all backends, so lets do that.

8 years agovulkan: Don't crash if vkEnumeratePhysicalDevices fails
Alexander Larsson [Thu, 30 Nov 2017 13:48:15 +0000 (14:48 +0100)]
vulkan: Don't crash if vkEnumeratePhysicalDevices fails

8 years agobroadway: Improve logging
Alexander Larsson [Thu, 30 Nov 2017 13:47:08 +0000 (14:47 +0100)]
broadway: Improve logging

We now log backwards, so that the latest is always visible.
Also, we use <pre> with a smaller size.

8 years agobroadway: Send diffs of node trees
Alexander Larsson [Thu, 30 Nov 2017 09:36:30 +0000 (10:36 +0100)]
broadway: Send diffs of node trees

Reusing pre-created nodes is a lot faster both in terms of
dom modifications and of transfer sizes.

8 years agobroadway: Add broadway_node_equal
Alexander Larsson [Wed, 29 Nov 2017 19:05:36 +0000 (20:05 +0100)]
broadway: Add broadway_node_equal

8 years agobroadway: Prepare for implementing diff
Alexander Larsson [Wed, 29 Nov 2017 19:05:02 +0000 (20:05 +0100)]
broadway: Prepare for implementing diff

8 years agobroadway: Add div for container nodes
Alexander Larsson [Wed, 29 Nov 2017 18:31:54 +0000 (19:31 +0100)]
broadway: Add div for container nodes

We need this so that all nodes have divs, otherwise diffing is going
to be very hard.

8 years agobroadway: Deserialize node tree in server
Alexander Larsson [Wed, 29 Nov 2017 18:08:37 +0000 (19:08 +0100)]
broadway: Deserialize node tree in server

This doesn't really change anything, but it is in preparation for diffing
the trees.

8 years agobroadway: Add a texture cache
Alexander Larsson [Wed, 29 Nov 2017 17:16:24 +0000 (18:16 +0100)]
broadway: Add a texture cache

This ensures we never upload a texture we already have locally available.

8 years agobroadway: Re-add seat and core device creation
Alexander Larsson [Wed, 29 Nov 2017 17:11:45 +0000 (18:11 +0100)]
broadway: Re-add seat and core device creation

8 years agoUpdate POTFILES.in
Piotr Drąg [Thu, 30 Nov 2017 15:10:50 +0000 (16:10 +0100)]
Update POTFILES.in

8 years agoUse the new texture utils here
Matthias Clasen [Thu, 30 Nov 2017 12:54:52 +0000 (07:54 -0500)]
Use the new texture utils here

One less place where we juggle pixbufs.

8 years agoMake texture variants of some pixbuf utils
Matthias Clasen [Thu, 30 Nov 2017 12:54:27 +0000 (07:54 -0500)]
Make texture variants of some pixbuf utils

This will let us avoid direct pixbuf use in some places.

8 years agorecent manager: Drop an unused field
Matthias Clasen [Thu, 30 Nov 2017 12:03:20 +0000 (07:03 -0500)]
recent manager: Drop an unused field

8 years agoFix up a doc comment
Matthias Clasen [Thu, 30 Nov 2017 04:35:45 +0000 (23:35 -0500)]
Fix up a doc comment

8 years agoRemove some unused includes
Matthias Clasen [Thu, 30 Nov 2017 04:34:58 +0000 (23:34 -0500)]
Remove some unused includes

These show up in a grep for "pixbuf".

8 years agoUse a texture instead of a pixbuf in gtk_render_icon
Matthias Clasen [Thu, 30 Nov 2017 04:30:47 +0000 (23:30 -0500)]
Use a texture instead of a pixbuf in gtk_render_icon

This gets rid of more GdkPixbuf in the API.

Update all callers.

8 years agotextview: Replace pixbufs by textures
Matthias Clasen [Thu, 30 Nov 2017 04:22:13 +0000 (23:22 -0500)]
textview: Replace pixbufs by textures

This affects a few apis, such as gtk_text_iter_get_pixbuf,
gtk_text_buffer_insert_pixbuf and GtkTextBuffer::insert-pixbuf,
which have all been replaced by texture equivalents.

Update all callers.

8 years agotextview: Remove serialization API
Benjamin Otte [Mon, 27 Nov 2017 03:17:36 +0000 (04:17 +0100)]
textview: Remove serialization API

It's unused. Plain text is not using that framework, neither is
in-process same-display transmission.

So it was only useful for sharing text with custom tags across
applications, and nobody is doing that.

8 years agoa11y: Remove AtkStreamableContent implementation
Benjamin Otte [Mon, 27 Nov 2017 01:15:53 +0000 (02:15 +0100)]
a11y: Remove AtkStreamableContent implementation

That is some old code that still uses IOChannels, and the only
pseudouser is at-spi-atk's commented out code that is still using
CORBA types.

So get rid of it now before I need to start adapting it to the new
clipboard.

8 years agoicon theme: Remove unused code
Matthias Clasen [Thu, 30 Nov 2017 03:25:57 +0000 (22:25 -0500)]
icon theme: Remove unused code

The deprecated api to add builtin icons was removed
a year ago, so we don't need the code anymore that deals
with looking up builtin icons.

8 years agotooltip: Set icon from texture instead of pixbuf
Matthias Clasen [Thu, 30 Nov 2017 03:17:59 +0000 (22:17 -0500)]
tooltip: Set icon from texture instead of pixbuf

Another part of removing GdkPixbuf from APIs.

8 years agoDrop gtk_cell_view_new_with_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 01:26:28 +0000 (20:26 -0500)]
Drop gtk_cell_view_new_with_pixbuf

We have a texture-based alternative for this now.

8 years agoDrop gdk_cursor_new_from_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 01:16:43 +0000 (20:16 -0500)]
Drop gdk_cursor_new_from_pixbuf

Part of the push to remove GdkPixbuf from the API.

8 years agodocs: Remove mentions of gdk_cursor_new_from_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 01:14:53 +0000 (20:14 -0500)]
docs: Remove mentions of gdk_cursor_new_from_pixbuf

This function is going away.

8 years agodnd: Stop using gdk_cursor_new_from_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 01:13:26 +0000 (20:13 -0500)]
dnd: Stop using gdk_cursor_new_from_pixbuf

We can just use gdk_cursor_new_from_texture here.

8 years agoFix the build
Matthias Clasen [Thu, 30 Nov 2017 01:12:43 +0000 (20:12 -0500)]
Fix the build

8 years agoDrop gtk_drag_source_set_icon_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 01:02:47 +0000 (20:02 -0500)]
Drop gtk_drag_source_set_icon_pixbuf

Part of removing GdkPixbuf from the API.

8 years agotestdnd: Stop using gtk_drag_source_set_icon_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 01:02:01 +0000 (20:02 -0500)]
testdnd: Stop using gtk_drag_source_set_icon_pixbuf

We can avoid it here as well.

8 years agoicon-browser: Stop using gtk_drag_source_set_icon_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 01:01:32 +0000 (20:01 -0500)]
icon-browser: Stop using gtk_drag_source_set_icon_pixbuf

We can just use gtk_drag_source_set_icon_name.

8 years agoDrop gtk_css_image_surface_new_for_pixbuf
Matthias Clasen [Thu, 30 Nov 2017 00:47:57 +0000 (19:47 -0500)]
Drop gtk_css_image_surface_new_for_pixbuf

It is unused private api.

8 years agoAvoid pixbufs when loading themed icons
Matthias Clasen [Thu, 30 Nov 2017 00:44:30 +0000 (19:44 -0500)]
Avoid pixbufs when loading themed icons

We can directly get a texture from GtkIconTheme now.

8 years agoAdd gtk_cell_view_new_with_texture
Matthias Clasen [Thu, 30 Nov 2017 00:28:53 +0000 (19:28 -0500)]
Add gtk_cell_view_new_with_texture

Just more api to replace pixbufs with textures.

8 years agoDrop gtk_snapshot_render_icon
Matthias Clasen [Wed, 29 Nov 2017 23:34:45 +0000 (18:34 -0500)]
Drop gtk_snapshot_render_icon

Its not used, and we are working towards removing
GdkPixbuf in the API.

8 years agowindow: Stop using GdkPixbuf
Matthias Clasen [Wed, 29 Nov 2017 22:23:56 +0000 (17:23 -0500)]
window: Stop using GdkPixbuf

We can get by with just using GdkTexture.

8 years agoCosmetic formatting fixes
Matthias Clasen [Wed, 29 Nov 2017 22:06:15 +0000 (17:06 -0500)]
Cosmetic formatting fixes

8 years agowayland: Fix indentation of previous commit
Christophe Fergeau [Wed, 29 Nov 2017 11:15:30 +0000 (12:15 +0100)]
wayland: Fix indentation of previous commit

8 years agowayland: emit GDK_SELECTION_CLEAR on owner changes
Christophe Fergeau [Tue, 28 Nov 2017 16:44:06 +0000 (17:44 +0100)]
wayland: emit GDK_SELECTION_CLEAR on owner changes

The wayland backend currently never emits GDK_SELECTION_CLEAR events.
GtkClipboard uses this signal in order to clear the clipboard owner when
the selection is set to something outside the application.
This commit ensures the wayland backend emits GDK_SELECTION_CLEAR before
setting the clipboard owner to NULL, as this means we lost the
selection.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790031

8 years agowayland: Remove unused data structure
Christophe Fergeau [Tue, 28 Nov 2017 16:43:24 +0000 (17:43 +0100)]
wayland: Remove unused data structure

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790031

8 years agoDrop gtk_application_is_inhibited
Matthias Clasen [Wed, 29 Nov 2017 04:02:58 +0000 (23:02 -0500)]
Drop gtk_application_is_inhibited

This function returns global session state that may
not be available to applications (e.g. in sandboxed
environments), and is not needed by applications,
so just drop it, instead of keeping a function around
that can't be guaranteed to work.

8 years agoImprove the docs
Matthias Clasen [Wed, 29 Nov 2017 03:52:44 +0000 (22:52 -0500)]
Improve the docs

Document that gtk_application_is_inhibited can't
be guaranteed to work.

8 years agoinspector: Reorganize stack
Benjamin Otte [Wed, 29 Nov 2017 03:02:24 +0000 (04:02 +0100)]
inspector: Reorganize stack

There are too many stack elements in the main stack. So add a substack
for the pages that display common global state. The appropriate name I
found for it was "Global".

It's used to house the General, Visual, Resources and Statistics pages
for now.

8 years agoinspector: remove visible=TRUE properties
Benjamin Otte [Wed, 29 Nov 2017 02:25:58 +0000 (03:25 +0100)]
inspector: remove visible=TRUE properties

This is the defualt these days.

8 years agogdk: Add some missing autocleanups
Matthias Clasen [Tue, 28 Nov 2017 20:03:15 +0000 (15:03 -0500)]
gdk: Add some missing autocleanups

GdkMonitor and GdkSeat were missing here.

8 years agoFix some parameter name mismatches to make g-ir-scanner happier
Rico Tzschichholz [Tue, 28 Nov 2017 14:20:14 +0000 (15:20 +0100)]
Fix some parameter name mismatches to make g-ir-scanner happier

8 years agogdkseatdefault: Use TABLET_STYLUS capability for styli/erasers/cursors
Carlos Garnacho [Mon, 27 Nov 2017 20:24:54 +0000 (21:24 +0100)]
gdkseatdefault: Use TABLET_STYLUS capability for styli/erasers/cursors

Those are devices created for drawing tablets, so using the "pointer"
capability is far too generic.

8 years agogdk/wayland: Emit GdkSeat::device-added/removed
Carlos Garnacho [Mon, 27 Nov 2017 18:51:38 +0000 (19:51 +0100)]
gdk/wayland: Emit GdkSeat::device-added/removed

Those were never sent in this backend...

8 years agoFix up _gtk_widget_list_devices
Matthias Clasen [Mon, 27 Nov 2017 17:34:08 +0000 (12:34 -0500)]
Fix up _gtk_widget_list_devices

When I rewrote that function to not use GdkDeviceManager,
I overlooked that the window filtering needs to apply
to the master pointer as well, as other code assumes
that _gtk_widget_get_device_window will return non-NULL
on the devices in the list. Fix this.

8 years agoFix a typo
Matthias Clasen [Mon, 27 Nov 2017 15:55:32 +0000 (10:55 -0500)]
Fix a typo

The signal is called ::unpaired-release.

8 years agoUpdate Serbian translation
Милош Поповић [Mon, 27 Nov 2017 10:38:07 +0000 (10:38 +0000)]
Update Serbian translation

8 years agolistbox: Handle unpaired releases as well
Matthias Clasen [Mon, 27 Nov 2017 00:52:01 +0000 (19:52 -0500)]
listbox: Handle unpaired releases as well

Same as for flowbox in the previous commit.

8 years agogtkflowbox: Activate items on ::unpaired-release
Carlos Garnacho [Tue, 21 Nov 2017 21:35:31 +0000 (22:35 +0100)]
gtkflowbox: Activate items on ::unpaired-release

If the flowbox is single-click.

https://bugzilla.gnome.org/show_bug.cgi?id=789163

8 years agogtkgesturemultipress: Add ::unpaired-release signal
Carlos Garnacho [Tue, 21 Nov 2017 19:14:52 +0000 (20:14 +0100)]
gtkgesturemultipress: Add ::unpaired-release signal

This signal will be emitted whenever the gesture received a
button release or touch end event without a pairing button
press or touch begin. This usually happens when grabs transfer
input from one widget to another mid-press.

https://bugzilla.gnome.org/show_bug.cgi?id=789163

8 years agowayland: Don't provide gsetting if dconf is not available
Matthias Clasen [Mon, 27 Nov 2017 00:40:28 +0000 (19:40 -0500)]
wayland: Don't provide gsetting if dconf is not available

This makes gtk+ fall back to reading ~/.config/gtk-3.0/settings.ini
on systems with Wayland, but without dconf (do those exist?).

https://bugzilla.gnome.org/show_bug.cgi?id=790201

8 years agoGtkWindow: Fix the down-scaling in icon_from_list()
Kjell Ahlstedt [Mon, 13 Nov 2017 11:48:57 +0000 (12:48 +0100)]
GtkWindow: Fix the down-scaling in icon_from_list()

Must use floating-point division to get the correct scale factors.
cairo_set_source_surface() must be called after cairo_scale().

https://bugzilla.gnome.org/show_bug.cgi?id=790287

8 years agoUpdate POTFILES.in
Piotr Drąg [Sat, 25 Nov 2017 16:32:53 +0000 (17:32 +0100)]
Update POTFILES.in